package game.roles.visual;

import game.frame.MainFrame;
import game.roles.Role;
import game.utils.ImageChange;

import java.awt.*;

/**
 * @author liuyulai
 * Created with IntelliJ IDEA.
 * Date: 21.5.8
 * Time: 10:20
 * Description: 受击效果
 */
public class Blast extends Role {
    public static Image[] blastImage;
    private ImageChange rm = new ImageChange(1);
    private int count;

    public Blast(int x, int y) {
        super(x, y, 80, 80);
    }

    @Override
    public void rolesMove() {
        count++;
        this.img = rm.change(blastImage);
        if (count >= 5) {
            MainFrame.roleList.remove(this);
            count = 0;
        }

    }
}
